package com.nbrc.service;

import java.io.InputStream;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.nbrc.helper.Pagenation;
import com.nbrc.jsonmodel.MyProcess;
import com.nbrc.jsonmodel.MyTask;
import com.nbrc.model.Myleave;
import com.nbrc.model.Role;
import com.nbrc.model.User;
@Transactional
public interface CommonService {

	User login(String username, String userpassword);

	boolean saveLeave(Myleave leave, User user, Role role);

	Pagenation<MyProcess> allFinished(User user, int page, int rows);

	Myleave getOneMyLeave(String id);

	Pagenation<MyTask> getAlltaskassignee(User user, String key, int page,
			int rows);

	void complete(String id, Map<String, Object> variables);

	Pagenation<MyTask> getAlltaskCandidateGroup(Role role, String key,
			int page, int rows);

	void claim(String id, User user);

	boolean oneModifyMyleave(Myleave leave,String taskid);

	InputStream graphHistoryProcessInstance(String processInstanceId);

	InputStream systemGraphHistoryProcessInstance(String processInstanceId);

}
